-
Notifications
You must be signed in to change notification settings - Fork 1
Move Validation before the Pipeline #462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
06a1613
to
63166aa
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #462 +/- ##
============================================
+ Coverage 85.12% 85.37% +0.25%
- Complexity 919 920 +1
============================================
Files 93 93
Lines 2789 2790 +1
Branches 292 292
============================================
+ Hits 2374 2382 +8
+ Misses 288 284 -4
+ Partials 127 124 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
response.expectStatus().isBadRequest().expectHeader().contentType("application/fhir+json") | ||
.expectBody() | ||
.jsonPath("$.resourceType").isEqualTo("OperationOutcome") | ||
.jsonPath("$.issue[0].diagnostics").isEqualTo("IllegalArgumentException: Invalid CRTDL"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diagnostics
should not contain any Java related artefacts like class names. So I would just remove IllegalArgumentException
. "Invalid CRDTL" is good enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok then i change the whole generation
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
class ResultFileManagerTest { | ||
final String RESULTS_DIR = "ResultFileManagerDir"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static final
|
||
resultFileManager.saveErrorToJson(jobId, operationOutcome, HTTP_OK).block(); | ||
|
||
assertThat(readJobErrorFile(jobId)).isEqualTo(fhirParser.encodeResourceToString(operationOutcome)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new parser has to be created for each parsing call.
Assertions.fail("HTTP request failed with status code: " + e.getStatusCode()); | ||
} | ||
|
||
} catch (IOException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please just throw exceptions from the test method. logging will not fail the test
0949e5e
to
f649ec0
Compare
f649ec0
to
65a7165
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the validate function name of the CrtdlValidatorService to
validateAndAnnotate
No description provided.